package com.nmf.site.biz.compcollege.college.web;

import java.util.List;
import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.nmf.dao.gen.bean.BaseCollege;
import com.nmf.site.basedata.category.enums.CategoryType;
import com.nmf.site.basedata.category.service.BaseBizCategoryService;
import com.nmf.site.biz.compcollege.comp.service.CompCollegeService;
@Controller
@RequestMapping(value = "${adminPath}/compCollege/college")
public class CCollegeController {
	@Autowired
	CompCollegeService compCollegeService;
	@Autowired
	BaseBizCategoryService baseBizCategoryService;
	@RequiresPermissions("comp:bizCompany:view")
	@RequestMapping(value = "college/categoryList")
	public String collegeTree(Model model) {
		Map<String,List<BaseCollege>> dmap = compCollegeService.queryTreeCollegeList();
		model.addAttribute("dmap", dmap);
		model.addAttribute("categoryList", baseBizCategoryService.queryCategory(CategoryType.school));
		return "company/collegeTree";
	}
	
}
